package com.wushi.emeeting.dao;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class DAOutil {
	private static SessionFactory factory;
	private static Session session;
	private static Configuration config;
	public static Session getSession(){
	
		if(config==null){
			config=new Configuration().configure();
		}
		if(factory==null){
			factory=config.buildSessionFactory();
		}
		session=factory.openSession();
		return session;
	}		

}
